#include "DirectXException.h"

using namespace DirectXCore;

DirectXException::DirectXException(HRESULT result, const char* apiName)
	: std::runtime_error("DirectX API call failed: " + std::string(apiName) +
		" with error: 0x" + std::to_string(result)),
	mResult(result), mApiName(apiName) {}

HRESULT DirectXException::GetResult() const { return mResult; }

const std::string& DirectXException::GetApiName() const { return mApiName; }